import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:niuniu_lulu/index/model/app_theme.dart';
import 'index/index.dart';
import 'home/index.dart';

void main() {
  runApp(LuLuApp());
}

class LuLuApp extends StatefulWidget {
  @override
  _LuLuAppState createState() => _LuLuAppState();
}

class _LuLuAppState extends State<LuLuApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '牛牛',
      builder: BotToastInit(), //1.调用BotToastInit
      navigatorObservers: [BotToastNavigatorObserver()], //2.注册路由观察者
      home: ChangeNotifierProvider(
        create: (_) => AppTheme(),
        child: MainHome(),
      )
    );
  }
}
